<p>问答题</p>
<!-- 不可编辑状态 -->
<div *ngIf="!editable">   
  <p>{{question.title}}</p>
  <input placeholder="请输入你的答案" class="form-control" [(ngModel)]="question.answer" />
</div>

<!-- 可编辑情况下的编辑状态 -->
<div *ngIf="editable && isEditing">   
  <input placeholder="请输入问题" class="form-control" [(ngModel)]="question.title" required>
  <div class="btns">
    <button (click)="onSave()" class="btn">保存</button>
    <button (click)="onCancel()" class="btn">取消</button>
  </div>
</div>

<!-- 可编辑状态下的非编辑状态 -->
<div *ngIf="editable && !isEditing">   
  <p>{{question.title}}</p>
  <input placeholder="请输入问题的答案" class="form-control" disabled="disabled" />
  <div class="btns">
    <button (click)="onEdit()" class="btn btn-default">编辑</button>
    <button (click)="onDelete()" class="btn btn-default">删除</button>
  </div>
</div>